﻿<%
'Create a demo logged User
	dim Username
	Username = Request.QueryString("user")'"tester"
	if(Username="") then 
	    Username="FinanceChannel"
	end if
	'Response.Write("User="&Username)
	'Response.End
	if Request.Cookies("CurrentUser") = "" then
		Response.Cookies("CurrentUser") = Username
		Response.Cookies("CurrentUser").Expires = date()+1
	end if
%>

<%
Dim arrBaseFolder
Redim arrBaseFolder(4)
Dim arrBaseName
Redim arrBaseName(4)
Dim strRootFolder
Dim UserFolderObject

Dim bReturnAbsolute
dim currentUser

bReturnAbsolute=false
currentUser="FinanceChannel"

'Root folder
strRootFolder = "/images/uploaded/"

'Check User folder
Set UserFolderObject = Server.CreateObject("Scripting.FileSystemObject")
'Check if user already have folder
if UserFolderObject.FolderExists(server.MapPath(strRootFolder & Request.Cookies("CurrentUser"))) Then
	'do something
else
	'create folder for this user
	UserFolderObject.CreateFolder( server.MapPath(strRootFolder & Request.Cookies("CurrentUser")) )	
	UserFolderObject.CreateFolder( server.MapPath(strRootFolder & Request.Cookies("CurrentUser")) & "/Thumbnails" )	
	UserFolderObject.CreateFolder( server.MapPath(strRootFolder & Request.Cookies("CurrentUser")) & "/Thumbnails/ChildThumb" )	
end if

'arrBaseFolder(0)="/InnovaDemo/assets/"'Use "Relative to Root" Path
'arrBaseName(0)="Assets"
arrBaseFolder(0)=strRootFolder & Request.Cookies("CurrentUser") & "/"'Use "Relative to Root" Path
arrBaseName(0)=Request.Cookies("CurrentUser")


arrBaseFolder(1)=""
arrBaseName(1)=""

arrBaseFolder(2)=""
arrBaseName(2)=""

arrBaseFolder(3)=""
arrBaseName(3)=""
%>